package mia.dao;

import java.util.List;

import mia.entity.CategoryEntity;
import mia.util.HibernateManager;

import org.hibernate.Criteria;
import org.hibernate.Session;
import org.hibernate.criterion.Projections;

public class CategoryEntityDAO {

	@SuppressWarnings("unchecked")
	public static List<CategoryEntity> getCategories()
	{
		Session session = HibernateManager.getSession();
		Criteria crit = session.createCriteria(CategoryEntity.class);
		List<CategoryEntity> list = crit.list();
		return list;
	}
}
